import {NextRequest, NextResponse} from "next/server";
import {getResumeById} from "@/lib/resume";

export async function GET(req: NextRequest) {
    console.log(req.nextUrl.pathname);
    console.log(req.nextUrl.search);
    console.log(req.nextUrl.searchParams);


    let id = req.nextUrl.pathname.slice(
        req.nextUrl.pathname.lastIndexOf("/") + 1,
        req.nextUrl.pathname.length
    )

    const resume = await getResumeById(id)

    return NextResponse.json({resume})
}